<template>
    <div>
        <!-- A和B数据，当A的值是0的时候，要让B的值成为：‘stop’ -->
        <h3>A:{{ A }}</h3>
        <h3 :comput='A === 0 ? (B = `stop`): A'>B:{{ B }}</h3>
        <button @click='A--'>action</button>
    </div>
</template>
<script>
export default {
    data(){
        return {
            A:10,
            B:'start',
        }
    },
    methods:{
        action(){
            if(this.A!==0){
                this.A--;
            }
        }
    }
}
</script>